function change_pass(e)
{
	var new_pass = document.getElementById("new_pass").value;
	var re_new_pass = document.getElementById("re_new_pass").value;
	if(re_new_pass!=new_pass){
		document.getElementById('errorq').innerHTML=e;		
		return false;
	}
	return true;
}
function loadAjaxGet(link_load,div_load){
	document.getElementById(div_load).innerHTML=iconload;		
	var xmlhttp;	
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{				
			document.getElementById(div_load).innerHTML=xmlhttp.responseText;		
		}
	  }					
		xmlhttp.open("GET",link_load,true);	
	xmlhttp.send();	 	
}
function loadAjaxPost(link_load,params,div_load){
	document.getElementById(div_load).innerHTML=iconload;			
	var xmlhttp;
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	if (xmlhttp.readyState == 4 || xmlhttp.readyState == 0) {	
		document.getElementById(div_load).innerHTML = iconload;	
		xmlhttp.open("POST", link_load, true);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");			
		xmlhttp.onreadystatechange = function() {				
			if (xmlhttp.readyState == 4) {
				//alert(xmlhttp.responseText);
				if (xmlhttp.status == 200) {							
					document.getElementById(div_load).innerHTML = xmlhttp.responseText;	
				}					
			}
		}
		xmlhttp.send(params);
	}
}
function loadAjax(a,b){	
	var xmlhttp;	
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{				
			document.getElementById("AjaxSearch").innerHTML=xmlhttp.responseText;		
		}
	  }	
	if(a==1){	
		
		xmlhttp.open("GET","http://phim.iyou.vn?page=_AjaxSearch&type="+b,true);	
	}
	xmlhttp.send();
}
function Key(e){		
	var keypressed = null;		
	if (window.event)
	{
		keypressed = window.event.keyCode; //IE
	}
	else
	{ 
		keypressed = e.which; //NON-IE, Standard
	}	

	if (keypressed < 48 || keypressed > 57)
	{ //CharCode c?a 0 là 48 (Theo b?ng mã ASCII)
	//CharCode c?a 9 là 57 (Theo b?ng mã ASCII)		
		if (keypressed == 8 || keypressed == 127)
		{//Phím Delete và Phím Back			
			return ;
		}else if(keypressed == 13){
			return ;		
		} 						
			return false;
	}	
}
function Del(check,links){	
	var tl= confirm(check);
	if(tl==true){
		window.location=links;
	}
}
function Load(links){	
	window.location=links;
}